package common_enum

// 公共-绑定操作
type commonBindOperation int

var CommonBindOperation commonBindOperation

// 绑定
func (c *commonBindOperation) Bind() int {
	return 1
}

// 解绑
func (c *commonBindOperation) Untie() int {
	return 2
}

func (c *commonBindOperation) ToText(value int) string {
	switch value {

	case 1:
		return "绑定"

	case 2:
		return "解绑"

	}
	return ""
}

func (c *commonBindOperation) ToValue(text string) int {
	switch text {

	case "绑定":
		return 1

	case "解绑":
		return 2

	}
	return 0
}
